<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="day1_style.css">
    <title>Hello world!</title>
</head>

<body>
    <p id="text"><strong>hello world!!!</strong></p>
    <button onclick="change()" id="b1">变为红色</button><br>
    <button onclick="reback()" id="b2">复原</button>

    <script>
        function change() {
            let x = document.getElementById('text');
            x.className = 'a';
        }
        function reback() {
            let x = document.getElementById('text');
            x.className = 'b';
        }
    </script>
</body>

</html>